/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
	Platform,
	StyleSheet,
	Text,
	View,	
} from 'react-native';

import {
	DrawerNavigator
} from 'react-navigation';
//我的申请
import MyTravel from './src/pages/myTravel/myTravel'
//差旅审批
import TravelApproval from './src/pages/travelApproval/travelApproval'
//侧面导航栏组件
import ContentComponent from './src/pages/contentComponent/contentComponent'

const instructions = Platform.select({
	ios: 'Press Cmd+R to reload,\n' +
		'Cmd+D or shake for dev menu',
	android: 'Double tap R on your keyboard to reload,\n' +
		'Shake or press menu button for dev menu',
});

export default class App extends Component < {} > {

	
	render() {
		return(
			<Navigator/>  			
		);
	}
}
const Navigator = DrawerNavigator({  
    Home:{screen:MyTravel},  
    Mine:{screen:TravelApproval},  
},{
	drawerWidth:400,
	drawerPosition:'left',
	//contentComponent:ContentComponent,
	contentOptions:{
		activeTintColor:'red',
		activeBackgroundColor:'pink'
		/*initialRouteName 默认页面组件
		activeTintColor 选中文字颜色
		activeBackgroundColor 选中背景颜色
		inactiveTintColor未选中文字颜色
		inactiveBackgroundColor未选中背景颜色
		style样式
		labelStyle 抽屉标签样式
		onItemPress 每次调用按钮Item时调用该方法
		drawerLabel 抽屉标注，可以是元素 或一个函数这个函数返回一个元素
		drawerIcon 抽屉图标 可以是元素 或一个函数这个函数返回一个元素*/
	}
});
//this.props.navigation.navigate('DrawerOpen'); // open drawer
//this.props.navigation.navigate('DrawerClose'); // close drawer

const styles = StyleSheet.create({
	container: {
		flex: 1
	}
});